package com.bootdo.lvyou.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.lvyou.dao.LvyouSpecialtyEnclosureDao;
import com.bootdo.lvyou.domain.LvyouSpecialtyEnclosure;
import com.bootdo.lvyou.service.LvyouSpecialtyEnclosureService;



@Service
public class LvyouSpecialtyEnclosureServiceImpl implements LvyouSpecialtyEnclosureService {
	@Autowired
	private LvyouSpecialtyEnclosureDao lvyouSpecialtyEnclosureDao;
	
	@Override
	public LvyouSpecialtyEnclosure get(Long id){
		return lvyouSpecialtyEnclosureDao.get(id);
	}
	
	@Override
	public List<LvyouSpecialtyEnclosure> list(Map<String, Object> map){
		return lvyouSpecialtyEnclosureDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return lvyouSpecialtyEnclosureDao.count(map);
	}
	
	@Override
	public int save(LvyouSpecialtyEnclosure lvyouSpecialtyEnclosure){
	
		if(lvyouSpecialtyEnclosure.getId() != null) {
			return lvyouSpecialtyEnclosureDao.update(lvyouSpecialtyEnclosure);
		}else {
			return lvyouSpecialtyEnclosureDao.save(lvyouSpecialtyEnclosure);
		}		
	
		
	}
	
	@Override
	public int update(LvyouSpecialtyEnclosure lvyouSpecialtyEnclosure){
		return lvyouSpecialtyEnclosureDao.update(lvyouSpecialtyEnclosure);
	}
	
	@Override
	public int remove(Long id){
		return lvyouSpecialtyEnclosureDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return lvyouSpecialtyEnclosureDao.batchRemove(ids);
	}
	
}
